package com.appspot.etao.util;

public class StringUtil {

	/**
	 * GAE String properties must be 500 characters or less.  
	 * Instead, use com.google.appengine.api.datastore.Text, which can store strings of any length.
	 */
	public static String cut(String str) {
		String result = str;
		
		if (result == null) result = "";
		
		if (result.length() > 500) {
			result = result.substring(0, 500);
		} 
		return result;
	}
}
